﻿using System;
using System.Collections.Generic;
using System.Configuration;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Sokoban.ViewModel.Boxes
{
    //enum boxType { Empty, Movable, Player, Barrier, Target, PlayerOverTarget, MovableOverTarget };
    public abstract class AbstractBox
    {
        //int row;
        //int col;
        //boxType type;
        ////public AbstractBox[] Neighbors = new AbstractBox[4];
        //// template??
        //public AbstractBox(int row, int col, boxType type)
        //{
        //    this.row = row;
        //    this.col = col;
        //    this.type = type;
        //}
        //public boxType GetBoxType()
        //{
        //    return boxtype;
        //}
        //public void ChangeBoxTypeTo(boxType type)
        //{
        //    if ((this.type == boxType.Empty) && (type == boxType.Player))
        //        this.type = type;
        //    else if ((this.type == boxType.Empty) && (type == boxType.Movable))
        //        this.type = type;
        //    else if ((this.type == boxType.Player) && (type == boxType.Empty))
        //        this.type = type;
        //    else if ((this.type == boxType.Movable) && (type == boxType.Empty))
        //        this.type = type;
        //    else if ((this.type == boxType.Target) && (type == boxType.PlayerOverTarget))
        //        this.type = type;
        //    else if ((this.type == boxType.Target) && (type == boxType.MovableOverTarget))
        //        this.type = type;
        //    else if ((this.type == boxType.MovableOverTarget) && (type == boxType.Target))
        //        this.type = type;
        //    else if ((this.type == boxType.PlayerOverTarget) && (type == boxType.Target))
        //        this.type = type;
        //    else
        //        throw new System.InvalidOperationException("Illegal move!");
        //}
        //public int GetRow()
        //{
        //    return row;
        //}
        //public int GetCol()
        //{
        //    return col;
        //}
        //// implementations
        //// - empty
        //// - movable
        //// - player
        //// - barrier
        //// - target

        // common attributes
        // - position (int, int)
        // - template        
        protected int[,] position;
        public bool isOnGoal { get; set; }
        public bool IsWalkable { get; set; }

        public AbstractBox()
        {

        }

        public AbstractBox(int col, int row)
        {
            position = new int[col, row];
        }

        public abstract AbstractBox Clone();
        //class Box:AbstractBox
        //{
        //}

        //class PlayerOnTarget : AbstractBox
        //{
        //    private Box player;
        //    private Box target;
        //}

        //// prtotype folder - ti protítpusotok, wpf mini app, 

        //// implement boxes

        //// implenet box matrix

        //// implement xml read write

        //// thinkog of ui control objects

    }
}
